home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6e 65 | 77 73 2e 70 72 69 6d 65 |Path: ne|ws.prime|
|00000010| 6e 65 74 2e 63 6f 6d 21 | 6e 6f 74 2d 66 6f 72 2d |net.com!|not-for-|
|00000020| 6d 61 69 6c 0a 46 72 6f | 6d 3a 20 4a 69 6d 20 43 |mail.Fro|m: Jim C|
|00000030| 61 73 73 69 64 79 20 3c | 6a 69 6d 62 6f 63 40 70 |assidy <|jimboc@p|
|00000040| 72 69 6d 65 6e 65 74 2e | 63 6f 6d 3e 0a 4e 65 77 |rimenet.|com>.New|
|00000050| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 6c 61 |sgroups:| comp.la|
|00000060| 6e 67 2e 63 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |ng.c.Sub|ject: Re|
|00000070| 3a 20 4c 6f 61 64 69 6e | 67 20 6c 69 6e 6b 65 64 |: Loadin|g linked|
|00000080| 20 73 74 72 75 63 74 75 | 72 65 73 20 66 72 6f 6d | structu|res from|
|00000090| 20 61 20 66 69 6c 65 2d | 2d 77 68 61 74 20 69 73 | a file-|-what is|
|000000a0| 20 73 74 61 6e 64 61 72 | 64 20 77 61 79 3f 0a 44 | standar|d way?.D|
|000000b0| 61 74 65 3a 20 32 30 20 | 4d 61 72 20 31 39 39 36 |ate: 20 |Mar 1996|
|000000c0| 20 31 30 3a 35 31 3a 30 | 30 20 2d 30 37 30 30 0a | 10:51:0|0 -0700.|
|000000d0| 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 3a 20 50 72 |Organiza|tion: Pr|
|000000e0| 69 6d 65 6e 65 74 20 53 | 65 72 76 69 63 65 73 20 |imenet S|ervices |
|000000f0| 66 6f 72 20 74 68 65 20 | 49 6e 74 65 72 6e 65 74 |for the |Internet|
|00000100| 0a 53 65 6e 64 65 72 3a | 20 72 6f 6f 74 40 70 72 |.Sender:| root@pr|
|00000110| 69 6d 65 6e 65 74 2e 63 | 6f 6d 0a 4d 65 73 73 61 |imenet.c|om.Messa|
|00000120| 67 65 2d 49 44 3a 20 3c | 33 31 35 30 34 35 38 37 |ge-ID: <|31504587|
|00000130| 2e 37 35 36 44 40 70 72 | 69 6d 65 6e 65 74 2e 63 |.756D@pr|imenet.c|
|00000140| 6f 6d 3e 0a 52 65 66 65 | 72 65 6e 63 65 73 3a 20 |om>.Refe|rences: |
|00000150| 3c 34 69 6f 31 73 64 24 | 62 36 75 40 70 6f 73 74 |<4io1sd$|b6u@post|
|00000160| 2e 67 73 66 63 2e 6e 61 | 73 61 2e 67 6f 76 3e 0a |.gsfc.na|sa.gov>.|
|00000170| 58 2d 50 6f 73 74 65 64 | 2d 42 79 3a 20 69 70 30 |X-Posted|-By: ip0|
|00000180| 32 37 2e 70 68 78 2e 70 | 72 69 6d 65 6e 65 74 2e |27.phx.p|rimenet.|
|00000190| 63 6f 6d 0a 58 2d 4d 61 | 69 6c 65 72 3a 20 4d 6f |com.X-Ma|iler: Mo|
|000001a0| 7a 69 6c 6c 61 20 32 2e | 30 20 28 57 69 6e 39 35 |zilla 2.|0 (Win95|
|000001b0| 3b 20 49 29 0a 4d 49 4d | 45 2d 56 65 72 73 69 6f |; I).MIM|E-Versio|
|000001c0| 6e 3a 20 31 2e 30 0a 54 | 6f 3a 20 4d 4a 41 20 3c |n: 1.0.T|o: MJA <|
|000001d0| 6d 6f 6e 69 63 61 40 76 | 6c 73 69 39 2e 67 73 66 |monica@v|lsi9.gsf|
|000001e0| 63 2e 6e 61 73 61 2e 67 | 6f 76 3e 0a 43 6f 6e 74 |c.nasa.g|ov>.Cont|
|000001f0| 65 6e 74 2d 54 79 70 65 | 3a 20 74 65 78 74 2f 70 |ent-Type|: text/p|
|00000200| 6c 61 69 6e 3b 20 63 68 | 61 72 73 65 74 3d 75 73 |lain; ch|arset=us|
|00000210| 2d 61 73 63 69 69 0a 43 | 6f 6e 74 65 6e 74 2d 54 |-ascii.C|ontent-T|
|00000220| 72 61 6e 73 66 65 72 2d | 45 6e 63 6f 64 69 6e 67 |ransfer-|Encoding|
|00000230| 3a 20 37 62 69 74 0a 0a | 4d 4a 41 20 77 72 6f 74 |: 7bit..|MJA wrot|
|00000240| 65 3a 0a 3e 20 0a 3e 20 | 53 75 70 70 6f 73 65 20 |e:.> .> |Suppose |
|00000250| 74 68 69 73 20 69 73 20 | 6d 79 20 63 6f 64 65 3a |this is |my code:|
|00000260| 0a 3e 20 0a 3e 20 73 74 | 72 75 63 74 20 48 45 4c |.> .> st|ruct HEL|
|00000270| 4c 20 7b 0a 3e 20 20 20 | 20 20 20 20 20 20 20 63 |L {.> | c|
|00000280| 68 61 72 20 41 5b 5d 3b | 0a 3e 20 20 20 20 20 20 |har A[];|.> |
|00000290| 20 20 20 20 63 68 61 72 | 20 42 5b 5d 3b 0a 3e 20 | char| B[];.> |
|000002a0| 20 20 20 20 20 20 20 20 | 20 63 68 61 72 20 43 5b | | char C[|
|000002b0| 5d 3b 0a 3e 20 20 20 20 | 20 20 20 20 20 20 69 6e |];.> | in|
|000002c0| 74 20 6e 75 6d 62 65 72 | 3b 0a 3e 20 20 20 20 20 |t number|;.> |
|000002d0| 20 20 20 20 20 73 74 72 | 75 63 74 20 48 45 4c 4c | str|uct HELL|
|000002e0| 20 2a 6e 65 78 74 3b 0a | 3e 20 20 20 20 20 20 20 | *next;.|> |
|000002f0| 20 20 20 20 20 7d 20 44 | 65 76 69 6c 2c 20 2a 70 | } D|evil, *p|
|00000300| 74 72 3b 0a 3e 20 0a 3e | 20 6c 6f 61 64 73 74 72 |tr;.> .>| loadstr|
|00000310| 75 63 74 28 29 0a 3e 20 | 7b 20 66 75 6e 63 74 69 |uct().> |{ functi|
|00000320| 6f 6e 20 6c 6f 61 64 73 | 20 61 20 73 74 72 75 63 |on loads| a struc|
|00000330| 74 75 72 65 20 77 69 74 | 68 20 64 61 74 61 20 67 |ture wit|h data g|
|00000340| 6f 74 74 65 6e 20 66 72 | 6f 6d 20 61 20 63 6f 6e |otten fr|om a con|
|00000350| 66 69 67 75 72 61 74 69 | 6f 6e 20 66 69 6c 65 20 |figurati|on file |
|00000360| 7d 0a 3e 20 0a 0a 5b 53 | 4e 49 50 5d 0a 0a 3e 20 |}.> ..[S|NIP]..> |
|00000370| 53 75 70 70 6f 73 65 20 | 49 20 64 6f 6e 27 74 20 |Suppose |I don't |
|00000380| 6b 6e 6f 77 20 68 6f 77 | 20 6d 61 6e 79 20 72 65 |know how| many re|
|00000390| 63 6f 72 64 73 20 49 20 | 68 61 76 65 2e 20 20 49 |cords I |have. I|
|000003a0| 20 77 69 6c 6c 20 63 72 | 65 61 74 65 20 61 20 64 | will cr|eate a d|
|000003b0| 79 6e 61 6d 69 63 61 6c | 6c 79 0a 3e 20 6c 69 6e |ynamical|ly.> lin|
|000003c0| 6b 65 64 20 6c 69 73 74 | 2e 20 20 49 20 77 61 6e |ked list|. I wan|
|000003d0| 74 20 74 6f 20 64 79 6e | 61 6d 69 63 61 6c 6c 79 |t to dyn|amically|
|000003e0| 20 63 72 65 61 74 65 2c | 20 69 6e 20 74 68 69 73 | create,| in this|
|000003f0| 20 63 61 73 65 20 33 20 | 6c 69 6e 6b 65 64 20 73 | case 3 |linked s|
|00000400| 74 72 75 63 74 75 72 65 | 73 20 6f 66 0a 3e 20 74 |tructure|s of.> t|
|00000410| 79 70 65 20 48 45 4c 4c | 2e 0a 3e 20 49 20 77 61 |ype HELL|..> I wa|
|00000420| 6e 74 20 74 6f 20 6d 61 | 6c 6c 6f 63 20 73 70 61 |nt to ma|lloc spa|
|00000430| 63 65 20 66 6f 72 20 65 | 61 63 68 20 6e 65 77 20 |ce for e|ach new |
|00000440| 73 74 72 75 63 74 75 72 | 65 20 61 6e 64 20 49 20 |structur|e and I |
|00000450| 77 61 6e 74 20 2a 70 74 | 72 20 74 6f 20 70 6f 69 |want *pt|r to poi|
|00000460| 6e 74 20 74 6f 20 69 74 | 2e 0a 3e 20 53 6f 2c 20 |nt to it|..> So, |
|00000470| 6d 79 20 71 75 65 73 74 | 69 6f 6e 20 69 73 20 64 |my quest|ion is d|
|00000480| 6f 20 49 20 70 61 73 73 | 20 74 68 65 20 2a 70 74 |o I pass| the *pt|
|00000490| 72 20 74 6f 20 6d 79 20 | 6c 6f 61 64 73 74 72 75 |r to my |loadstru|
|000004a0| 63 74 28 29 20 66 75 6e | 63 74 69 6f 6e 20 6f 72 |ct() fun|ction or|
|000004b0| 20 64 6f 20 49 0a 3e 20 | 63 72 65 61 74 65 20 61 | do I.> |create a|
|000004c0| 20 73 70 61 63 65 20 66 | 6f 72 20 65 61 63 68 20 | space f|or each |
|000004d0| 73 74 72 75 63 74 75 72 | 65 20 28 6d 61 6c 6c 6f |structur|e (mallo|
|000004e0| 63 29 20 61 6e 64 20 70 | 61 73 73 20 74 68 65 20 |c) and p|ass the |
|000004f0| 77 68 6f 6c 65 20 73 74 | 72 75 63 74 75 72 65 20 |whole st|ructure |
|00000500| 74 6f 20 6d 79 0a 3e 20 | 66 75 6e 63 74 69 6f 6e |to my.> |function|
|00000510| 20 6c 6f 61 64 73 74 72 | 75 63 74 28 29 3f 0a 0a | loadstr|uct()?..|
|00000520| 41 63 74 75 61 6c 6c 79 | 2c 20 79 6f 75 20 6d 69 |Actually|, you mi|
|00000530| 67 68 74 20 77 61 6e 74 | 20 61 20 70 6f 69 6e 74 |ght want| a point|
|00000540| 65 72 20 74 6f 20 61 20 | 48 45 4c 4c 20 73 74 72 |er to a |HELL str|
|00000550| 75 63 74 75 72 65 20 74 | 68 61 74 20 70 6f 69 6e |ucture t|hat poin|
|00000560| 74 73 20 74 6f 20 74 68 | 65 20 68 65 61 64 20 6f |ts to th|e head o|
|00000570| 66 20 74 68 65 20 6c 69 | 73 74 2c 0a 6c 69 6b 65 |f the li|st,.like|
|00000580| 20 74 68 69 73 3a 0a 0a | 09 73 74 72 75 63 74 20 | this:..|.struct |
|00000590| 48 45 4c 4c 20 2a 68 65 | 61 64 3b 0a 0a 54 68 65 |HELL *he|ad;..The|
|000005a0| 6e 2c 20 64 6f 20 79 6f | 75 72 20 6c 6f 61 64 73 |n, do yo|ur loads|
|000005b0| 74 72 75 63 74 28 73 74 | 72 75 63 74 20 48 45 4c |truct(st|ruct HEL|
|000005c0| 4c 20 2a 68 65 61 64 29 | 3b 20 20 28 6d 61 79 62 |L *head)|; (mayb|
|000005d0| 65 20 63 61 6c 6c 20 74 | 68 65 20 66 69 6c 65 0a |e call t|he file.|
|000005e0| 4c 6f 61 64 46 69 6c 65 | 28 73 74 75 63 74 20 48 |LoadFile|(stuct H|
|000005f0| 45 4c 4c 20 2a 68 65 61 | 64 29 3b 0a 0a 61 6e 64 |ELL *hea|d);..and|
|00000600| 20 68 61 76 65 20 74 68 | 65 20 6c 6f 61 64 73 74 | have th|e loadst|
|00000610| 72 75 63 74 28 29 20 66 | 75 6e 63 74 69 6f 6e 20 |ruct() f|unction |
|00000620| 61 6c 6c 6f 63 61 74 65 | 20 6d 65 6d 6f 72 79 20 |allocate| memory |
|00000630| 61 73 20 6e 65 65 64 65 | 64 2c 20 6c 6f 61 64 20 |as neede|d, load |
|00000640| 69 6e 20 79 6f 75 72 20 | 6e 65 77 20 0a 64 61 74 |in your |new .dat|
|00000650| 61 2c 20 61 6e 64 20 75 | 70 64 61 74 65 20 2a 68 |a, and u|pdate *h|
|00000660| 65 61 64 20 61 6e 64 20 | 65 61 63 68 20 73 74 72 |ead and |each str|
|00000670| 75 63 75 74 75 72 65 73 | 20 2a 6e 65 78 74 20 66 |ucutures| *next f|
|00000680| 69 65 6c 64 2e 20 20 54 | 68 65 6e 2c 20 77 68 65 |ield. T|hen, whe|
|00000690| 6e 20 79 6f 75 72 20 64 | 6f 6e 65 2c 20 0a 2a 68 |n your d|one, .*h|
|000006a0| 65 61 64 20 70 6f 69 6e | 74 73 20 74 6f 20 74 68 |ead poin|ts to th|
|000006b0| 65 20 68 65 61 64 20 6f | 66 20 74 68 65 20 6e 65 |e head o|f the ne|
|000006c0| 77 6c 79 20 63 6f 6d 70 | 6c 65 74 65 64 20 6c 69 |wly comp|leted li|
|000006d0| 73 74 20 61 6e 64 20 79 | 6f 75 20 63 61 6e 20 74 |st and y|ou can t|
|000006e0| 72 61 76 65 72 73 65 0a | 79 6f 75 72 20 6c 69 73 |raverse.|your lis|
|000006f0| 74 20 28 77 6f 75 6c 64 | 20 74 68 61 74 20 62 65 |t (would| that be|
|00000700| 20 67 6f 69 6e 67 20 74 | 6f 20 68 65 6c 6c 3f 29 | going t|o hell?)|
|00000710| 0a 20 0a 3e 20 49 66 20 | 49 20 70 61 73 73 20 74 |. .> If |I pass t|
|00000720| 68 65 20 2a 70 74 72 2c | 20 49 20 77 69 6c 6c 20 |he *ptr,| I will |
|00000730| 6f 66 20 63 6f 75 72 73 | 65 20 75 70 64 61 74 65 |of cours|e update|
|00000740| 20 69 74 20 77 69 74 68 | 20 2a 70 74 72 20 3d 20 | it with| *ptr = |
|00000750| 70 74 72 20 2d 3e 20 2a | 6e 65 78 74 3b 0a 0a 53 |ptr -> *|next;..S|
|00000760| 65 65 20 61 62 6f 76 65 | 0a 0a 2d 2d 20 0a 4a 69 |ee above|..-- .Ji|
|00000770| 6d 20 43 61 73 73 69 64 | 79 20 20 20 20 20 20 20 |m Cassid|y |
|00000780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000790| 20 20 20 20 20 20 22 54 | 68 69 73 20 69 73 20 73 | "T|his is s|
|000007a0| 6f 20 63 6f 6f 6c 20 49 | 20 68 61 76 65 0a 20 20 |o cool I| have. |
|000007b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000007c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000007d0| 20 20 20 20 20 20 20 74 | 6f 20 67 6f 20 74 6f 20 | t|o go to |
|000007e0| 74 68 65 20 62 61 74 68 | 72 6f 6f 6d 22 0a 6a 69 |the bath|room".ji|
|000007f0| 6d 62 6f 63 40 70 72 69 | 6d 65 6e 65 74 2e 63 6f |mboc@pri|menet.co|
|00000800| 6d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |m | |
|00000810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2d | | -|
|00000820| 43 61 6c 76 69 6e 0a 68 | 74 74 70 3a 2f 2f 77 77 |Calvin.h|ttp://ww|
|00000830| 77 2e 70 72 69 6d 65 6e | 65 74 2e 63 6f 6d 2f 7e |w.primen|et.com/~|
|00000840| 6a 69 6d 62 6f 63 2f 0a | |jimboc/.| |
+--------+-------------------------+-------------------------+--------+--------+